"""
Union联合类型注解
"""
from typing import Union
my_list:list[Union[int, float]] = [90, 80, 88,92.5, 78.5]

def get_sum(num_list:list[Union[int, float]]) -> Union[int, float]:
    total:Union[int, float] = 0
    for item in num_list:
        total += item
    return total
print(f"{get_sum(my_list)} is {type(get_sum(my_list))}")
